﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using ZiDingYiKj;

namespace FormMdiTest
{
    public partial class Form3 : Form
    {
        private bool _ReadOnle;
        public Form3()
        {
            InitializeComponent();
            ComBoxUser com = new ComBoxUser();
        }

        private void textBox1_ReadOnlyChanged(object sender, EventArgs e)
        {
            this.textBox1.BackColor = Color.White;
        }

        private void button1_Click(object sender, EventArgs e)
        {
            this.textBox1.ReadOnly = !this.textBox1.ReadOnly;
        }
        protected override void WndProc(ref Message m)
        {
            if (this._ReadOnle && (m.Msg == 0xa1 || m.Msg == 0x201 || m.Msg == 0x203))
            {
                return;
            }
            base.WndProc(ref m);
        }
    }

}
